﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Item.aspx.cs" Inherits="Main_Item_ItemView"
    EnableEventValidation="false" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="AjaxControl" %>
<%@ Register Src="~/User Controls/PageHeading.ascx" TagName="heading" TagPrefix="acc" %>
<%@ Register Src="~/User Controls/CommonControls.ascx" TagName="CommonControls" TagPrefix="MyControls" %>
<%@ Register Src="~/User Controls/Pager.ascx" TagPrefix="custom" TagName="Pager" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>Item View</title>
    <link href="../../../Styles/accounts.css" rel="stylesheet" type="text/css" />
    <script src="../../../JavaScript/Commons.js" type="text/javascript"></script>
    <script src="../../../JavaScript/jquery-1.8.3.js" type="text/javascript"></script>
    <script type="text/javascript">
        function ShowBiggerImage(obj) {
            document.getElementById("LargeImageContainerDiv").style.display = "block";
            document.getElementById("LargeImageContainerDiv").innerHTML = "<img src='" + obj.src + "' width=350 height=400>";
            //alert(document.getElementById("LargeImageContainerDiv").innerHTML);            
        }
        function ShowDefaultImage(obj) {
            document.getElementById("LargeImageContainerDiv").style.display = "none";
            document.getElementById("LargeImageContainerDiv").innerHTML = "";
        }
        function isNumberKey(control_id, evt) 
        {
            var charCode = (evt.which) ? evt.which : event.keyCode;
            //alert(control_id + '/' + evt +'/'+charCode);   
            if (charCode > 31 && (charCode < 48 || charCode > 57) && (charCode < 45 || charCode >= 47))
                return false;
            if (control_id == 'txtqtymain' || control_id == 'TxtReorder' || control_id=='TxtItemCode') 
            {
                if (charCode == 46 || charCode == 45) 
                {
                    var dotcount = document.getElementById(control_id).value.split('.').length - 1;
                    if (dotcount >= 0) 
                    {
                        return false;
                    }
                }
            }
            return true;
        }

        function closeWindows() {
            window.open('', '_parent', '');
            window.close();
        }
        function CheckItemName() {
            alert("Entered Item Name is already Exists.");
            document.getElementById("TxtItemDescription").value = "";
            document.getElementById("TxtItemDescription").focus();
            return false;
        }
        function CheckItemCode() {
            alert("Entered Item Code is already Exists.");
            document.getElementById("TxtItemCode").value = "";
            document.getElementById("TxtItemCode").focus();
            return false;
        }

        function checkItemRepetion(id) {
            var ddl = document.getElementById(id);
            var currentValue = ddl.options[ddl.selectedIndex].value;
            var Count = document.getElementById("hidControl").value;
            for (var i = 1; i <= Count; i++) {
                var previous = document.getElementById("ddlItem" + i);
                var previousValue = previous.options[previous.selectedIndex].value
                if (ddl != previous) {
                    if (currentValue == previousValue) {
                        alert('Please Select Unique Item');
                        ddl.selectedIndex = 0;
                        break;
                    }
                }
            }
            return true;
        }

        function Validate() {
            var abc = new Boolean(true);

            var Count = document.getElementById("hidControl").value;
            for (var i = 1; i <= Count; i++) {
                var dropdown = document.getElementById("DDLLocation" + i);
                var ddlvalue = dropdown.options[dropdown.selectedIndex].value;
                var qtyval = document.getElementById("TxtQty" + i);
                var rateval = document.getElementById("TxtRate" + i).value;
                if (qtyval != '' && rateval != '' && parseFloat(qtyval) != 0 && parseFloat(rateval) != 0) {
                    if (ddlvalue == '0') {
                        alert("Select atleast One Location");
                        abc = false;
                        break;

                    }
                    if (document.getElementById("chkBatch").checked == 1) {
                        if (document.getElementById("TxtBatch" + i).value == '') {
                            alert("Select specify batch number");
                            abc = false;
                            break;
                        }
                    }
                }

            }
            alert(abc);
            return abc;
        }

        function CheckDuplicateLocationBatch() {
            var Count = document.getElementById("hidControl").value;
            for (var i = 1; i <= Count; i++) {
                var dropdown = document.getElementById("DDLLocation" + i);
                var ddlvalue = dropdown.options[dropdown.selectedIndex].value;
                var Textvalue = document.getElementById("TxtBatch" + i).value;
                if (ddlvalue != '0' && Textvalue != "") {
                    for (var j = 1; j <= Count; j++) {
                        if (j != i) {
                            var dropdown1 = document.getElementById("DDLLocation" + j);
                            var ddlvalue1 = dropdown1.options[dropdown1.selectedIndex].value;
                            var Textvalue1 = document.getElementById("TxtBatch" + j).value;
                            if (ddlvalue == ddlvalue1 && Textvalue == Textvalue1) {
                                alert("Duplicate location and batch No.");
                                return false;
                                break;
                            }
                        }
                    }
                }
            }
            return true;
        }

        function calcQty() {
            var Count = document.getElementById("hidControl").value;
            var totqty = 0;
            var totvalue = 0;
            for (var i = 1; i <= Count; i++) {
                var qty = 0;
                var rate = 0;
                var totalvalue = 0;
                if (document.getElementById("TxtQty" + i).value != '') {
                    qty = document.getElementById("TxtQty" + i).value;
                }
                if (document.getElementById("TxtRate" + i).value != '') {
                    rate = document.getElementById("TxtRate" + i).value;
                }
                totalvalue = parseFloat(qty) * parseFloat(rate);
                document.getElementById("TxtValue" + i).value = totalvalue;

                totqty += parseFloat(qty);
                totvalue += parseFloat(totalvalue);
            }
            document.getElementById("TxtTotal").value = totqty;
            document.getElementById("TxtTotal1").value = totvalue;
        }

        function MaximumOrMinimum(id) {
            if (document.getElementById(id).value == '') {
                document.getElementById(id).value = "0";
            }
        }

        function calcLeadTime() {
            var MFRLeadTime = 0;
            var TransitLeadTime = 0;
            var TotalLeadTime = 0;
            for (var i = 1; i < tblMPN.rows.length; i++) {
                if (document.getElementById("txtmfrleadtime" + i).value != '' && document.getElementById("txttransitleadtime" + i).value != '') {
                    document.getElementById("txttotalleadtime" + i).value = parseFloat(document.getElementById("txtmfrleadtime" + i).value) + parseFloat(document.getElementById("txttransitleadtime" + i).value);
                }
            }
        }
        function CalculateAmount() {
            //var count = document.getElementById("hidsecond").value;
            var totalOpeningStock = 0.0;
            if (document.getElementById("txtratemain").value != '') {
                rate = document.getElementById("txtratemain").value;
            }
            if (document.getElementById("txtqtymain").value != '') {
                qty = document.getElementById("txtqtymain").value;
            }
            tempvalue = parseFloat(rate) * qty;
            document.getElementById("txtvaluerateqtymain").value = tempvalue.toFixed(2);
            totalOpeningStock = parseFloat(totalOpeningStock) + parseFloat(tempvalue);
            document.getElementById("hidTotalOp").value = totalOpeningStock;

        }
        function Getvalue(id) {
            alert(id);
            var a = document.getElementById(id).value;
            document.getElementById("tempddlvalue").value = a;
        }
    </script>
    <style type="text/css">
        .hover
        {
            position: relative;
        }
        .tooltip
        {
            top: -20px;
            background-color: #88BD6E;
            color: white;
            opacity: 0;
            text-align: center;
            padding: 5px;
            position: absolute;
            -webkit-transition: all 0.5s;
            -moz-transition: all 0.5s;
            -ms-transition: all 0.5s;
            -o-transition: all 0.5s;
            transition: all 0.5s;
            visibility: hidden;
        }
        .hover:hover .tooltip
        {
            opacity: 1;
            visibility: visible;
        }
        .AutoExtender
        {
            margin: 0px;
            background-color: White;
            color: windowtext;
            border: 1px solid #006699;
            line-height: 18px;
            padding: 8px;
            border-width: 1px;
            border-style: solid;
            cursor: 'default';
            height: auto;
            min-height: 10px;
            font-family: Verdana, Helvetica, Sans-Serif;
            font-size: .8em;
            font-weight: normal;
            text-align: left;
            list-style-type: none;
        }
        .AutoExtenderList
        {
            border-bottom: solid 1px #006699;
            color: Maroon;
            padding: 1px;
        }
        .AutoExtenderHighlight
        {
            color: White;
            background-color: #006699;
            padding: 1px;
        }
        #Background
        {
            position: fixed;
            top: 0px;
            bottom: 0px;
            left: 0px;
            right: 0px;
            background-color: #E8EAEC;
            opacity: 0.5;
        }
        #Progress
        {
            position: fixed;
            top: 45%;
            margin-left: 350px;
            width: 300px;
            height: 50px;
            text-align: center;
        }
    </style>
    <script type="text/javascript">
        function divExpandCollapse(divname) {
            var div = document.getElementById(divname);
            var img = document.getElementById('img' + divname);
            if (div.style.display == "none") {
                div.style.display = "inline";
                img.src = "../../../Menu/images/minus.gif";
            }
            else {
                div.style.display = "none";
                img.src = "../../../Menu/images/plus.gif";
            }
        }
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <asp:ScriptManager ID="ScriptManager1" runat="server" EnablePageMethods="true" EnablePartialRendering="true">
    </asp:ScriptManager>
    <div>
        <acc:heading ID="header1" runat="server" HeadingText="Item Master" />
        <asp:Panel ID="PnlAddNew" runat="server" Visible="false">
            <asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional">
                <Triggers>
                    <asp:PostBackTrigger ControlID="Submit" />
                </Triggers>
                <ContentTemplate>
                    <div align="center">
                        <asp:Label ID="lblMsg" runat="server" Font-Bold="true"></asp:Label>
                    </div>
                    <asp:UpdateProgress DynamicLayout="false" AssociatedUpdatePanelID="UpdatePanel2"
                        ID="UpdProgress" runat="server">
                        <ProgressTemplate>
                            <div id="Background" runat="server">
                            </div>
                            <div align="center" id="Progress">
                                <img src="../../../Images/ajax-loader.gif" alt="progessbar" />
                            </div>
                        </ProgressTemplate>
                    </asp:UpdateProgress>
                    <asp:HiddenField ID="hidControl" runat="server" Value="4" />
                    <div style="width: 90%; margin-left: 3%; margin-right: 3%;">
                        <table class="tablecontent" style="width: 100%;">
                            <tr>
                                <td class="headtd" colspan="5">
                                    <div style="float: left;">
                                        Item Details
                                    </div>
                                    <div style="float: right;">
                                        <span class="required">*</span> Mandatory Field
                                    </div>
                                </td>
                                <tr>
                                    <td width="20%">
                                        Item Code <span class="required">*</span>
                                    </td>
                                    <td width="20%">
                                        <asp:TextBox ID="TxtItemCode" runat="server" AutoPostBack="true" CssClass="input" onKeyPress="return hidemsg();"
                                            MaxLength="25" onblur="return CheckNullOrWhiteSpace();" OnTextChanged="TxtItemCode_TextChanged" TabIndex="1" ToolTip="Enter Item Code"
                                            Width="200px"></asp:TextBox>
                                        <script type="text/javascript">
                                            function hidemsg() {
                                                document.getElementById("lblMsg").style["display"] = "none";
                                            }
                                            function CheckNullOrWhiteSpace() {
                                                var itemCode = document.getElementById("TxtItemCode").value;
                                                if (itemCode.length > 0) 
                                                {
                                                    if (itemCode.match(/^\s*$/)) 
                                                    {
                                                        alert("Please Enter the Item Code.");
                                                        return false;
                                                    }
                                                }                                                                                     
                                            }
                                        </script>
                                        <AjaxControl:AutoCompleteExtender ID="AutoItemCode" runat="server" CompletionInterval="0"
                                            CompletionListCssClass="AutoExtender" CompletionListHighlightedItemCssClass="AutoExtenderHighlight"
                                            CompletionListItemCssClass="AutoExtenderList" CompletionSetCount="20" DelimiterCharacters=";,"
                                            EnableCaching="true" FirstRowSelected="false" MinimumPrefixLength="1" ServiceMethod="GetItemCode"
                                            ShowOnlyCurrentWordInCompletionListItem="true" TargetControlID="TxtItemCode">
                                        </AjaxControl:AutoCompleteExtender>
                                        <asp:RequiredFieldValidator ID="RFVItemCode" runat="server" ControlToValidate="TxtItemCode"
                                            Display="Dynamic" ErrorMessage="*" ValidationGroup="V"></asp:RequiredFieldValidator>
                                    </td>
                                    <td width="20%">
                                        Item Name<span class="required">*</span>
                                    </td>
                                    <td width="20%">
                                        <asp:TextBox ID="TxtItemDescription" runat="server" AutoPostBack="true" CssClass="input" onblur="return CheckNullEmpty();"
                                            MaxLength="100" OnTextChanged="TxtItemDescription_TextChanged" TabIndex="2" ToolTip="Enter Item Name"
                                            Width="200px"></asp:TextBox>
                                        <script type="text/javascript">
                                            function CheckNullEmpty() {
                                                var itemName = document.getElementById("TxtItemDescription").value;
                                                if(Number(itemName.length) > 0) 
                                                {
                                                    if (itemName.match(/^\s*$/)) 
                                                    {
                                                        alert("Please Enter the Item Name.");
                                                        return false;
                                                    }
                                                }  
                                            }
                                        </script>
                                        <asp:RequiredFieldValidator ID="RFVItemDescription" runat="server" ControlToValidate="TxtItemDescription"
                                            Display="Dynamic" ErrorMessage="*" ValidationGroup="V"></asp:RequiredFieldValidator>
                                    </td>
                                    <td rowspan="6" width="20%" align="center">
                                        <%--<asp:Image ID="imgItem" runat="server" ImageUrl="../Main/Inventory/Item/Image/noimg.jpg"  height="150px" width="145px" />--%>
                                        <img id="imgItem" runat="server" height="145" style="border:2px solid #88BD6E;" width="163" src="~/Main/Inventory/Item/Image/noimg.jpg" />
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                        Alternate Item Code
                                    </td>
                                    <td>
                                        <asp:TextBox ID="TxtAlternateDesc" runat="server" CssClass="input" MaxLength="100"
                                            TabIndex="3" ToolTip="Enter Alternate Desc." Width="200px"></asp:TextBox>
                                    </td>
                                    <td>
                                        Additional Desc.
                                    </td>
                                    <td>
                                        <asp:TextBox ID="TxtAdditionalDesc" runat="server" CssClass="input" MaxLength="100"
                                            TabIndex="4" ToolTip="Enter Additional Description" Width="200px"></asp:TextBox>
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                        Item Group<span class="required">*</span>
                                    </td>
                                    <td>
                                        <asp:DropDownList ID="DDLItemGroup" runat="server" CssClass="dropdown" TabIndex="5"
                                            ToolTip="Enter Item Group" Width="203px">
                                        </asp:DropDownList>
                                    </td>
                                    <td>
                                        Category<span class="required">*</span>
                                    </td>
                                    <td>
                                        <asp:DropDownList ID="DDLCategory" runat="server" CssClass="dropdown" TabIndex="6"
                                            ToolTip="Enter Category" Width="203px">
                                        </asp:DropDownList>
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                        <div class="hover" style="width: 30%;">
                                            UOM<div class="tooltip" style="width: 150px;">
                                                Unit of Measurement</div>
                                            <span class="required">*</span></div>
                                    </td>
                                    <td>
                                        <asp:DropDownList ID="DDLPrimaryUnit" runat="server" AutoPostBack="true" CssClass="dropdown"
                                            TabIndex="7" ToolTip="Enter Primary UOM" Width="203px">
                                        </asp:DropDownList>
                                    </td>
                                    <td>
                                        Alternate Units for Item
                                    </td>
                                    <td>
                                        <asp:DropDownList ID="DdlAltUnit" runat="server" CssClass="dropdown" Enabled="false"
                                            TabIndex="8" Width="203px">
                                        </asp:DropDownList>
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                        location Id
                                    </td>
                                    <td>
                                        <asp:TextBox ID="txtlocationid" runat="server" MaxLength="100" CssClass="input" TabIndex="9" ToolTip="Enter bin location id"
                                            Width="200px"></asp:TextBox>
                                    </td>
                                    <td>
                                        Bin Reference<span class="required">*</span>
                                    </td>
                                    <td>
                                        <asp:TextBox ID="TxtBillRef" runat="server" MaxLength="50" CssClass="input" TabIndex="10" ToolTip="Enter Bin Ref"
                                            Width="200px"></asp:TextBox>
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                        Project Name <span class="required">*</span>
                                    </td>
                                    <td>
                                        <asp:DropDownList ID="ddlproject" runat="server" CssClass="dropdown" TabIndex="13"
                                            ToolTip="Enter Project" Width="203px">
                                        </asp:DropDownList>
                                    </td>
                                    <td>
                                        Stock Type<span class="required">*</span>
                                    </td>
                                    <td>
                                        <asp:DropDownList ID="DDLStockType" runat="server" CssClass="dropdown" TabIndex="11"
                                            ToolTip="Enter Stock type" Width="203px">
                                        </asp:DropDownList>
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                        Leased Type<span class="required">*</span>
                                    </td>
                                    <td>
                                        <asp:DropDownList ID="ddlLeasedType" runat="server" CssClass="dropdown" Width="203px">
                                            <asp:ListItem Text="-- Select Leased Type --" Value="0"></asp:ListItem>
                                            <asp:ListItem Text="Owned" Value="1"></asp:ListItem>
                                            <asp:ListItem Text="Consigned" Value="2"></asp:ListItem>
                                        </asp:DropDownList>
                                    </td>
                                    <td>
                                        Image
                                    </td>
                                    <td colspan="2">
                                        <asp:FileUpload ID="fld" runat="server" Width="350px" CssClass="input" onchange="return showpreview(this);" />
                                        <asp:HiddenField ID="ImagePath" runat="server" />                                        
                                        <script src="//code.jquery.com/jquery-1.10.2.min.js" type="text/javascript"></script>
                                        <script type="text/javascript">
                                            function showpreview(input) {
                                                if (input.files && input.files[0]) {
                                                    var reader = new FileReader();
                                                    reader.onload = function (e) {
                                                        $('#imgItem').attr('src', e.target.result);
                                                    }
                                                    reader.readAsDataURL(input.files[0]);
                                                }
                                            }
                                        </script>
                                        <asp:ImageButton ID="btnreset" runat="server" ToolTip="Reset Image" OnClientClick="return ImageReset();" ImageUrl="~/Images/reset.png" Width="15px" />                                        
                                        <script type="text/javascript">
                                            function ImageReset() {
                                                var FileName = document.getElementById("imgItem");
                                                FileName.src = "../Main/Inventory/Item/Image/noimg.jpg";
                                            }
                                        </script>
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                        Re-Order Qty
                                    </td>
                                    <td>
                                        <asp:TextBox ID="TxtReorder" runat="server" CssClass="input" MaxLength="10" onblur="MaximumOrMinimum(this.id);"
                                            onfocus="if(this.value=='0') this.value='';" onKeyPress="return isNumberKey(this.id,event)"
                                            TabIndex="18" Text="0" ToolTip="Maximum" Width="150px"></asp:TextBox>
                                    </td>
                                    <td>

                                    </td>
                                    <td colspan="2" align="right">
                                        
                                    </td>
                                </tr>
                                <tr style="display: none;">
                                    <td colspan="5" style="margin: 0;">
                                        <table style="width: 100%; margin-top: 5px; margin-bottom: 5px;">
                                            <tr>
                                                <td class="headtd" colspan="3" style="font-weight: bold; border-top: 1px solid #818181;
                                                    padding: 0; margin: 0;">
                                                    Quantity Level
                                                </td>
                                                <td class="headtd" colspan="2" style="display: none; font-weight: bold; border-top: 1px solid #818181;
                                                    padding: 0; margin: 0;">
                                                    Dimensional and Weight
                                                </td>
                                            </tr>
                                            <tr style="display: none;">
                                                <td style="width: 20%;">
                                                    Maximum
                                                </td>
                                                <td style="width: 20%;">
                                                    <asp:TextBox ID="TxtMaximum" runat="server" CssClass="input" MaxLength="10" onblur="MaximumOrMinimum(this.id);"
                                                        onfocus="if(this.value=='0.00') this.value='';" onKeyPress="return isNumberKey(this.id,event)"
                                                        TabIndex="14" Text="0.00" ToolTip="Maximum" Width="150px"></asp:TextBox>
                                                </td>
                                                <td style="width: 20%;">
                                                    Dimension
                                                </td>
                                                <td>
                                                    <asp:TextBox ID="TxtDimensional" runat="server" CssClass="input" MaxLength="20" onblur="MaximumOrMinimum(this.id);"
                                                        onfocus="if(this.value=='0.00') this.value='';" onKeyPress="return isNumberKey(this.id,event)"
                                                        TabIndex="15" Text="0.00" ToolTip="Dimension" Width="150px"></asp:TextBox>
                                                </td>
                                                <td>
                                                </td>
                                            </tr>
                                            <tr style="display: none;">
                                                <td>
                                                    Minimum
                                                </td>
                                                <td>
                                                    <asp:TextBox ID="TxtMinimum" runat="server" CssClass="input" MaxLength="10" onblur="MaximumOrMinimum(this.id);"
                                                        onfocus="if(this.value=='0.00') this.value='';" onKeyPress="return isNumberKey(this.id,event)"
                                                        TabIndex="16" Text="0.00" ToolTip="Maximum" Width="150px"></asp:TextBox>
                                                </td>
                                                <td>
                                                    Weight
                                                </td>
                                                <td>
                                                    <asp:TextBox ID="TxtWeight" runat="server" CssClass="input" MaxLength="10" onblur="MaximumOrMinimum(this.id);"
                                                        onfocus="if(this.value=='0.00') this.value='';" onKeyPress="return isNumberKey(this.id,event)"
                                                        TabIndex="17" Text="0.00" ToolTip="Weight" Width="150px"></asp:TextBox>
                                                </td>
                                                <td>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td style="width: 17%;">
                                                </td>
                                                <td>
                                                </td>
                                                <td style="display: none;">
                                                    Unit of Weight
                                                </td>
                                                <td style="display: none;">
                                                    <asp:DropDownList ID="DdlUnitOfweight" runat="server" CssClass="dropdown" TabIndex="19"
                                                        ToolTip=" Unit of Weight" Width="153px">
                                                    </asp:DropDownList>
                                                </td>
                                                <td>
                                                </td>
                                            </tr>
                                        </table>
                                    </td>
                                </tr>
                                <tr>
                                    <td colspan="5" style="padding: 0; margin: 0;">
                                        <table style="width: 100%;">
                                            <tr>
                                                <td class="headtd" style="background-color: #fbfbfb; font-weight: bold; border: 1px solid #818181;
                                                    padding: 0; margin: 0;">
                                                    Manufacturer Detail
                                                </td>
                                            </tr>
                                        </table>
                                        <%--Manufacturer Detail --%>
                                        <asp:HiddenField ID="HidMPNControl" runat="server" Value="3" />
                                        <table id="tblMPN" runat="server" style="width: 100%; margin-top: 5px; margin-bottom: 5px;">
                                            <tr>
                                                <td style="width: 19%;">
                                                    Manufacturer Part No<%--<span class="required">*</span>--%></td>
                                                <td style="width: 19%;">
                                                    Manufacturer Name<%--<span class="required">*</span>--%></td>
                                                <td style="width: 19%;">
                                                    MFR Lead Time<%--<span class="required">*</span>  --%></td>
                                                <td style="width: 19%;">
                                                    Transit Lead Time<%--<span class="required">*</span>--%></td>
                                                <td style="width: 19%;">
                                                    Total Lead Time<%--<span class="required">*</span>--%>&nbsp;&nbsp;
                                                    <asp:Button ID="btnAddMore" runat="server" CssClass="button" OnClick="btnAddMore_Click"
                                                        Text="Add More" />
                                                </td>
                                            </tr>
                                            <tr>
                                                <td style="width: 19%;">
                                                    <asp:TextBox ID="txtmanufacturecode1" runat="server" MaxLength="50" AutoPostBack="true" CssClass="input"
                                                        onblur="checkduplicate(this);" OnTextChanged="txtmanufacturecode_TextChanged"
                                                        TabIndex="20" ToolTip="Enter Manufacturer Part No" Width="70%"></asp:TextBox>
                                                    <AjaxControl:AutoCompleteExtender ID="ACEMPNCODE1" runat="server" CompletionInterval="0"
                                                        CompletionListCssClass="AutoExtender" CompletionListHighlightedItemCssClass="AutoExtenderHighlight"
                                                        CompletionListItemCssClass="AutoExtenderList" CompletionSetCount="20" DelimiterCharacters=";,"
                                                        EnableCaching="true" FirstRowSelected="false" MinimumPrefixLength="1" ServiceMethod="GetMpnCode"
                                                        ShowOnlyCurrentWordInCompletionListItem="true" TargetControlID="txtmanufacturecode1">
                                                    </AjaxControl:AutoCompleteExtender>
                                                    <script type="text/javascript">
                                                        function checkduplicate(a) {
                                                            var rowcount = document.getElementById("HidMPNControl").value;
                                                            var textID = a.id.match(/\d+$/);
                                                            for (var i = 1; i <= rowcount; i++) {
                                                                var tempstore = document.getElementById("txtmanufacturecode" + i).value;
                                                                if (i == textID) {
                                                                }
                                                                else {
                                                                    if (tempstore != "") {
                                                                        if (a.value == tempstore) {
                                                                            alert("Duplicate value is not Allow");
                                                                            document.getElementById("txtmanufacturecode" + textID).value = "";
                                                                            document.getElementById("txtmanufacturecode" + textID).focus();
                                                                            break;
                                                                        }
                                                                    }
                                                                }

                                                            }
                                                        }
                                                    </script>
                                                </td>
                                                <td style="width: 19%;">
                                                    <asp:DropDownList ID="ddlManufacturer1" runat="server" CssClass="dropdown" TabIndex="21"
                                                        Width="70%">
                                                    </asp:DropDownList>
                                                </td>
                                                <td style="width: 19%;">
                                                    <asp:TextBox ID="txtmfrleadtime1" runat="server" MaxLength="12" CssClass="input" onblur="calcLeadTime();"
                                                        onkeypress="return isNumberKey(this.id,event)" TabIndex="22" ToolTip="MFR Lead Time"
                                                        Width="70%"></asp:TextBox>
                                                        <span>(D)</span>                                                   
                                                </td>
                                                <td style="width: 19%;">
                                                    <asp:TextBox ID="txttransitleadtime1" runat="server" MaxLength="12" CssClass="input" onblur="calcLeadTime();"
                                                        onkeypress="return isNumberKey(this.id,event)" TabIndex="23" ToolTip="Transit Lead Time"
                                                        Width="70%"></asp:TextBox>
                                                    <span>(D)</span>                                                    
                                                </td>
                                                <td colspan="2" style="width: 19%;">
                                                    <asp:TextBox ID="txttotalleadtime1" runat="server" CssClass="input" onblur="calcLeadTime();"
                                                        onkeypress="return isNumberKey(this.id,event)" ReadOnly="true" Style="background-color: lightgray;"
                                                        TabIndex="24" ToolTip="Total Lead Time" Width="70%"></asp:TextBox>
                                                    <span>(D)</span>                                                    
                                                </td>
                                            </tr>
                                            <tr>
                                                <td style="width: 19%;">
                                                    <asp:TextBox ID="txtmanufacturecode2" runat="server" MaxLength="50" AutoPostBack="true" CssClass="input"
                                                        onblur="checkduplicate(this);" OnTextChanged="txtmanufacturecode_TextChanged"
                                                        TabIndex="20" ToolTip="Enter Manufacturer Part No" Width="70%"></asp:TextBox>
                                                    <AjaxControl:AutoCompleteExtender ID="ACEMPNCODE2" runat="server" CompletionInterval="0"
                                                        CompletionListCssClass="AutoExtender" CompletionListHighlightedItemCssClass="AutoExtenderHighlight"
                                                        CompletionListItemCssClass="AutoExtenderList" CompletionSetCount="20" DelimiterCharacters=";,"
                                                        EnableCaching="true" FirstRowSelected="false" MinimumPrefixLength="1" ServiceMethod="GetMpnCode"
                                                        ShowOnlyCurrentWordInCompletionListItem="true" TargetControlID="txtmanufacturecode2">
                                                    </AjaxControl:AutoCompleteExtender>
                                                </td>
                                                <td style="width: 19%;">
                                                    <asp:DropDownList ID="ddlManufacturer2" runat="server" CssClass="dropdown" TabIndex="21"
                                                        Width="70%">
                                                    </asp:DropDownList>
                                                </td>
                                                <td style="width: 19%;">
                                                    <asp:TextBox ID="txtmfrleadtime2" runat="server" CssClass="input" MaxLength="12" onblur="calcLeadTime();"
                                                        onkeypress="return isNumberKey(this.id,event)" TabIndex="22" ToolTip="MFR Lead Time"
                                                        Width="70%"></asp:TextBox>
                                                    <span>(D)</span>                                                    
                                                </td>
                                                <td style="width: 19%;">
                                                    <asp:TextBox ID="txttransitleadtime2" runat="server" CssClass="input" MaxLength="12" onblur="calcLeadTime();"
                                                        onkeypress="return isNumberKey(this.id,event)" TabIndex="23" ToolTip="Transit Lead Time"
                                                        Width="70%"></asp:TextBox>
                                                    <span>(D)</span>                                                    
                                                </td>
                                                <td colspan="2" style="width: 19%;">
                                                    <asp:TextBox ID="txttotalleadtime2" runat="server" CssClass="input" onblur="calcLeadTime();"
                                                        onkeypress="return isNumberKey(this.id,event)" ReadOnly="true" Style="background-color: lightgray;"
                                                        TabIndex="24" ToolTip="Total Lead Time" Width="70%"></asp:TextBox>
                                                    <span>(D)</span>                                                    
                                                </td>
                                            </tr>
                                            <tr>
                                                <td style="width: 19%;">
                                                    <asp:TextBox ID="txtmanufacturecode3" runat="server" AutoPostBack="true" MaxLength="50" CssClass="input"
                                                        onblur="checkduplicate(this);" OnTextChanged="txtmanufacturecode_TextChanged"
                                                        TabIndex="20" ToolTip="Enter Manufacturer Part No" Width="70%"></asp:TextBox>
                                                    <AjaxControl:AutoCompleteExtender ID="ACEMPNCODE3" runat="server" CompletionInterval="0"
                                                        CompletionListCssClass="AutoExtender" CompletionListHighlightedItemCssClass="AutoExtenderHighlight"
                                                        CompletionListItemCssClass="AutoExtenderList" CompletionSetCount="20" DelimiterCharacters=";,"
                                                        EnableCaching="true" FirstRowSelected="false" MinimumPrefixLength="1" ServiceMethod="GetMpnCode"
                                                        ShowOnlyCurrentWordInCompletionListItem="true" TargetControlID="txtmanufacturecode3">
                                                    </AjaxControl:AutoCompleteExtender>
                                                </td>
                                                <td style="width: 19%;">
                                                    <asp:DropDownList ID="ddlManufacturer3" runat="server" CssClass="dropdown" TabIndex="21"
                                                        Width="70%">
                                                    </asp:DropDownList>
                                                </td>
                                                <td style="width: 19%;">
                                                    <asp:TextBox ID="txtmfrleadtime3" runat="server" CssClass="input" MaxLength="12" onblur="calcLeadTime();"
                                                        onkeypress="return isNumberKey(this.id,event)" TabIndex="22" ToolTip="MFR Lead Time"
                                                        Width="70%"></asp:TextBox>
                                                    <span>(D)</span>                                                    
                                                </td>
                                                <td style="width: 19%;">
                                                    <asp:TextBox ID="txttransitleadtime3" runat="server" CssClass="input" MaxLength="12" onblur="calcLeadTime();"
                                                        onkeypress="return isNumberKey(this.id,event)" TabIndex="23" ToolTip="Transit Lead Time"
                                                        Width="70%"></asp:TextBox>
                                                    <span>(D)</span>                                                    
                                                </td>
                                                <td colspan="2" style="width: 19%;">
                                                    <asp:TextBox ID="txttotalleadtime3" runat="server" CssClass="input" onblur="calcLeadTime();"
                                                        onkeypress="return isNumberKey(this.id,event)" ReadOnly="true" Style="background-color: lightgray;"
                                                        TabIndex="24" ToolTip="Total Lead Time" Width="70%"></asp:TextBox>
                                                    <span>(D)</span>                                                    
                                                </td>
                                            </tr>
                                        </table>
                                    </td>
                                </tr>
                                <asp:Panel ID="panmain" runat="server">
                                    <tr>
                                        <td colspan="5" style="padding: 0; margin: 0; width: 100%">
                                            <table id="tbldisbatch" runat="server" style="width: 100%;">
                                                <tr>
                                                    <td class="headtd" colspan="6" style="background-color: #fbfbfb; font-weight: bold;
                                                        border: 1px solid #818181; padding: 0; margin: 0;">
                                                        Opening Balance
                                                    </td>
                                                </tr>
                                            </table>
                                            <table id="tblopeningbal" runat="server" style="width: 100%;">
                                                <tr>
                                                    <td>
                                                        Opening Date
                                                    </td>
                                                    <td>
                                                        Location<span class="required">*</span>
                                                    </td>
                                                    <td>
                                                        Qty<span class="required">*</span>
                                                    </td>
                                                    <td>
                                                        Rate<span class="required">*</span>
                                                    </td>
                                                    <td>
                                                        Value
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td>
                                                        <asp:HiddenField ID="hidTotalOp" runat="server" />
                                                        <asp:TextBox ID="txtopeningdate" runat="server" CssClass="input" Enabled="false"
                                                            TabIndex="25" Width="100px"></asp:TextBox>
                                                    </td>
                                                    <td>
                                                        <asp:DropDownList ID="ddlloc" runat="server" CssClass="dropdown" TabIndex="27" Width="150px">
                                                        </asp:DropDownList>
                                                        <asp:HiddenField ID="hidrowcount" runat="server" />
                                                        <%--onchange="return Getvalue(this.id);"--%>
                                                    </td>
                                                    <td>
                                                        <asp:TextBox ID="txtqtymain" MaxLength="10" runat="server" CssClass="input" onblur="return CalculateAmount();"
                                                            onkeypress="return isNumberKey(this.id,event)" TabIndex="28" ToolTip="enter qty"
                                                            Width="140px"></asp:TextBox>
                                                    </td>
                                                    <td>
                                                        <asp:TextBox ID="txtratemain" runat="server" MaxLength="10" CssClass="input" onblur="return CalculateAmount();"
                                                            onkeypress="return isNumberKey(this.id,event)" TabIndex="29" ToolTip="enter rate"
                                                            Width="140px"></asp:TextBox>
                                                    </td>
                                                    <td>
                                                        <asp:TextBox ID="txtvaluerateqtymain" runat="server" CssClass="input" Enabled="false"
                                                            onkeypress="return isNumberKey(this.id,event)" TabIndex="30" ToolTip="Total value"
                                                            Width="140px"></asp:TextBox>
                                                    </td>
                                                </tr>
                                            </table>
                                        </td>
                                    </tr>
                                </asp:Panel>
                                <tr>
                                    <td align="center" colspan="5">
                                        <asp:UpdatePanel ID="UpdatePanel2" runat="server">
                                            <ContentTemplate>
                                                <asp:Button ID="Submit" runat="server" CssClass="button" OnClick="Submit_Click" OnClientClick="return validation();"
                                                    Text="Submit" />
                                                &nbsp;
                                                <script type="text/javascript">
                                                    function validation() {
                                                        if (document.getElementById("TxtItemCode").value == '') {                                                           
                                                            alert("Enter Item Code.");
                                                            document.getElementById("TxtItemCode").focus();
                                                            return false;
                                                        }                                                        
                                                        else if (document.getElementById("TxtItemDescription").value == '') {
                                                            alert(" Enter Item Name.");
                                                            document.getElementById("TxtItemDescription").focus();
                                                            return false;
                                                        }
                                                        else if (document.getElementById("DDLItemGroup").selectedIndex == 0) {
                                                            alert("Select Item Group.");
                                                            document.getElementById("DDLItemGroup").focus();
                                                            return false;
                                                        }
                                                        else if (document.getElementById("DDLPrimaryUnit").selectedIndex == 0) {
                                                            alert("Select U O M.");
                                                            document.getElementById("DDLPrimaryUnit").focus();
                                                            return false;
                                                        }
                                                        else if (document.getElementById("DDLStockType").selectedIndex == 0) {
                                                            alert("Select Stock Type.");
                                                            document.getElementById("DDLStockType").focus();
                                                            return false;
                                                        }
                                                        else if (document.getElementById("ddlproject").selectedIndex == 0) {
                                                            alert("Select Project Name.");
                                                            document.getElementById("ddlproject").focus();
                                                            return false;
                                                        }
                                                        else if (document.getElementById("ddlLeasedType").selectedIndex == 0) {
                                                            alert("Select Leased type.");
                                                            document.getElementById("ddlLeasedType").focus();
                                                            return false;
                                                        }
                                                        else if (document.getElementById("TxtBillRef").value == '') {
                                                            alert("Please Enter Bin Reference.");
                                                            document.getElementById("TxtBillRef").focus();
                                                            return false;
                                                        }
                                                        else if (document.getElementById("txtqtymain").value == '') {
                                                            alert("Please Enter Quantity.");
                                                            document.getElementById("txtqtymain").focus();
                                                            return false;
                                                        }
                                                        else if (document.getElementById("txtratemain").value == '') {
                                                            alert("Please Enter Rate.");
                                                            document.getElementById("txtratemain").focus();
                                                            return false;
                                                        }
                                                        else {
                                                            return true;
                                                        }
                                                    }
                                                </script>
                                                <asp:Button ID="Close" runat="server" CausesValidation="false" CssClass="button"
                                                    OnClick="Close_Click" Text="Close" />
                                            </ContentTemplate>
                                        </asp:UpdatePanel>
                                    </td>
                                </tr>
                            </tr>
                        </table>
                    </div>
                </ContentTemplate>
            </asp:UpdatePanel>
        </asp:Panel>
    </div>
    <div style="margin-left: 0.5%;">
        <div id="PnlPaging" runat="server" visible="false" style="padding-top: 10px;">
            <table width="100%">
                <tr>
                    <td style="width: 25%;">
                        <div style="float: left;">
                            <%--<custom:Pager ID="custPager" runat="server" OnPageChanged="custPager_PageChanged" />--%>
                        </div>
                    </td>
                    <td style="width: 25%;">
                        <div style="float: left;">
                            <%--<asp:ImageButton ID="imgpdf" runat="server" ImageUrl="~/Images/PDF.png" OnClick="imgpdf_Click" />&nbsp;
                            <asp:ImageButton ID="imgword" runat="server" ImageUrl="~/Images/word_icon.png" OnClick="imgword_Click" />&nbsp;--%>
                            Export To:
                            <asp:ImageButton ID="imgxl" ToolTip="Export to Excel" runat="server" ImageUrl="~/Images/Excel.png"
                                OnClick="imgxl_Click" />
                        </div>
                    </td>
                    <td style="width: 8%;">
                    </td>
                    <td style="width: 42%;">
                        <asp:Label ID="lblcolumnname" runat="server" Text="Column Name"></asp:Label>
                        <asp:DropDownList ID="ddlColumn" onchange="return cleartextbox();" runat="server"
                            CssClass="dropdown" Width="100px">
                            <asp:ListItem Text="--Select--" Value="0"></asp:ListItem>
                            <asp:ListItem Text="Item Code" Value="1"></asp:ListItem>
                            <asp:ListItem Text="Bin Reference" Value="2"></asp:ListItem>
                            <asp:ListItem Text="Item Name" Value="3"></asp:ListItem>
                            <asp:ListItem Text="Alt Item Code" Value="4"></asp:ListItem>
                            <asp:ListItem Text="Project" Value="6"></asp:ListItem>
                        </asp:DropDownList>
                        <script type="text/javascript">
                            function cleartextbox() {
                                document.getElementById("txtvalue").value = "";
                            }
                        </script>
                        <asp:TextBox ID="txtvalue" runat="server" CssClass="input"></asp:TextBox>
                        <asp:Button ID="btnSearch" runat="server" Text="Search" CssClass="button" OnClick="btnSearch_Click"
                            EnableViewState="false" />
                    </td>
                </tr>
            </table>
        </div>
        <div style="text-align: left;">
            <div id="PnlView" runat="server" visible="false">
                <asp:GridView ID="GridItemView" runat="server" CssClass="gridview" PagerStyle-CssClass="pgr"
                    AutoGenerateColumns="False" AllowPaging="True" PageSize="20" DataKeyNames="ITMID"
                    OnPageIndexChanging="GridItemView_PageIndexChanging" EmptyDataRowStyle-CssClass="emptyrow"
                    EmptyDataText="No Record Exist!" OnSelectedIndexChanged="GridItemView_SelectedIndexChanged"
                    OnRowCreated="GridItemView_RowCreated" OnRowDataBound="GridItemView_RowDataBound"
                    OnDataBound="GridItemView_DataBound">
                    <Columns>
                        <asp:TemplateField HeaderText="S.No" ItemStyle-HorizontalAlign="Center">
                            <ItemTemplate>
                                <%#Container.DataItemIndex+1%>
                                <asp:HiddenField ID="hidactive" runat="server" Value='<%#Bind("ITMACTIVE")%>' />
                                <a href="Javascript:divExpandCollapse('div<%# Eval("ITMID") %>');">
                                    <img id="imgdiv<%#Eval("ITMID") %>" width="9px" border="0" src="../../../Menu/images/plus.gif" />
                                </a>
                            </ItemTemplate>
                            <ItemStyle HorizontalAlign="Center" />
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="Item Code">
                            <ItemTemplate>
                                <asp:Label ID="Label1" runat="server" Text='<%# Bind("ITMCODE") %>'></asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="Item Name" ItemStyle-Width="10px" ItemStyle-Wrap="true">
                            <ItemTemplate>
                                <asp:Label ID="Label2" runat="server" Text='<%# Bind("ITMDESC") %>'></asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="Alt Item Code" ItemStyle-Width="10px" ItemStyle-Wrap="true">
                            <ItemTemplate>
                                <asp:Label ID="Label3" runat="server" Text='<%# Bind("ALTITEMCODE") %>'></asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="Item Group">
                            <ItemTemplate>
                                <asp:Label ID="Label4" runat="server" Text='<%# Bind("IGRID") %>'></asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="UOM">
                            <ItemTemplate>
                                <asp:Label ID="Label5" runat="server" Text='<%# Bind("PRIMARYUOMID") %>'></asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>                        
                        <asp:TemplateField HeaderText="Project Name" ItemStyle-Width="200px" ItemStyle-Wrap="true">
                            <ItemTemplate>
                                <asp:Label ID="Label7" runat="server" Text='<%# Bind("Projectname") %>'></asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="Location Id">
                            <ItemTemplate>
                                <asp:Label ID="Label8" runat="server" Text='<%# Bind("locationid") %>'></asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="Bin Number">
                            <ItemTemplate>
                                <asp:Label ID="Label9" runat="server" Text='<%# Bind("BinREF") %>'></asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="Re-Order Qty">
                            <ItemTemplate>
                                <asp:Label ID="Label10" runat="server" Text='<%# Bind("reorderqty") %>'></asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="WareHouse Location">
                            <ItemTemplate>
                                <asp:Label ID="Label11" runat="server" Text='<%# Bind("location") %>'></asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="Leased Type">
                            <ItemTemplate>
                                <asp:Label ID="Label1123" runat="server" Text='<%# Bind("LEASEDTYPE") %>'></asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="Qty">
                            <ItemTemplate>
                                <asp:Label ID="Label11233" runat="server" Text='<%# Bind("QTY") %>'></asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="Rate">
                            <ItemTemplate>
                                <asp:Label ID="Label12321" runat="server" Text='<%# Bind("RATE") %>'></asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="Value">
                            <ItemTemplate>
                                <asp:Label ID="Label112312312" runat="server" Text='<%# Bind("VALUE") %>'></asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField>
                            <ItemTemplate>
                                <asp:Image ID="imgitem" runat="server" Height="30px" ImageUrl='<%# Bind("IMAGEPATH")%>'
                                    onmouseout="ShowDefaultImage(this);" onmouseover="ShowBiggerImage(this);" Width="30px" />
                            </ItemTemplate>
                            <HeaderTemplate>
                                <asp:Label ID="lblimage" runat="server" Text="Item Image"></asp:Label>
                            </HeaderTemplate>
                        </asp:TemplateField>
                        <asp:CommandField HeaderText="Edit" SelectText="<img src='../../../Menu/images/Edit_user.png' alt='Edit'>"
                            ShowSelectButton="true" />
                        <asp:TemplateField>
                            <ItemTemplate>
                                <tr>
                                    <td colspan="100%">
                                        <div id="div<%# Eval("ITMID") %>" style="display: none; position: relative; left: 15px;
                                            overflow: auto">
                                            <asp:GridView ID="gvItemChild" runat="server" CssClass="gridview" AutoGenerateColumns="false">
                                                <Columns>
                                                    <asp:TemplateField HeaderText="S.No">
                                                        <ItemTemplate>
                                                            <%# Container.DataItemIndex+1 %>
                                                        </ItemTemplate>
                                                    </asp:TemplateField>
                                                    <asp:BoundField HeaderText="MPN" DataField="Manufacturecode" NullDisplayText="--" />
                                                    <asp:BoundField HeaderText="Manufacture Name" DataField="ManufactureName" NullDisplayText="--" />
                                                    <asp:BoundField HeaderText="MFR Lead Time" DataField="mfrleadtime" NullDisplayText="--"
                                                        ItemStyle-HorizontalAlign="Right" />
                                                    <asp:BoundField HeaderText="Transit Time" DataField="transitltime" NullDisplayText="--"
                                                        ItemStyle-HorizontalAlign="Right" />
                                                    <%--<asp:BoundField HeaderText="Opening Date" DataField="OPENINGDATE" NullDisplayText="--" />--%>
                                                </Columns>
                                            </asp:GridView>
                                        </div>
                                    </td>
                                </tr>
                            </ItemTemplate>
                        </asp:TemplateField>
                    </Columns>
                    <PagerStyle HorizontalAlign="Left" />
                    <EmptyDataRowStyle CssClass="emptyrow" />
                    <PagerSettings Mode="NextPreviousFirstLast" Position="TopAndBottom" FirstPageText="First"
                        LastPageText="Last" NextPageText="Next" PreviousPageText="Prev" />
                </asp:GridView>
                <div id="LargeImageContainerDiv" style="position: absolute; display: none; left: 30%;
                    top: 6%; border: 10px Solid silver;">
                </div>
            </div>
        </div>
    </div>
    <asp:GridView ID="grditemexcel" runat="server" Style="display: none;">
    </asp:GridView>
    </form>
</body>
</html>
